package com.automannn.practice.mybatis.sqlSource;

import org.apache.ibatis.builder.StaticSqlSource;
import org.apache.ibatis.mapping.BoundSql;
import org.apache.ibatis.session.Configuration;

/**
 * @author chenkh
 * @time 2021/11/10 14:45
 */
public class StaticSqlSourceTest {
    public static void main(String[] args) {
        Configuration configuration = new Configuration();
        StaticSqlSource staticSqlSource = new StaticSqlSource(configuration,"select * from user");
        /*xxx: 将 参数 与 sql 语句进行绑定, 而非根据参数获取 sql语句 */
       BoundSql boundSql= staticSqlSource.getBoundSql("aaa");
        System.out.println(boundSql);

    }
}
